package com.hyk.learning.common.exception;

import com.hyk.learning.common.enums.RpcErrorMessageEnum;

/**
 * @className: RpcException
 * @author: hyk199710
 * @description: TODO
 * @date: 2024/5/9 22:30
 */
public class RpcException extends RuntimeException {
    public RpcException(RpcErrorMessageEnum rpcErrorMessageEnum, String detail) {
        super(rpcErrorMessageEnum.getMessage() + ":" + detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

    public RpcException(RpcErrorMessageEnum rpcErrorMessageEnum) {
        super(rpcErrorMessageEnum.getMessage());
    }
}
